/**
 * Created by chenkeliang on 2017/3/8.
 */
const webpack = require('webpack')
const path = require('path')

module.exports = {
    devtool: 'source-map',
    entry: {
        'app': [
            'react-hot-loader/patch',
            'webpack-dev-server/client?http://localhost:7000',
            'webpack/hot/only-dev-server',
            './src/index'
        ]
    },
    output: {
        path: path.resolve(__dirname, './build'),
        publicPath: '/build/',
        filename: 'app.js'
    },
    module: {
        loaders: [{
            test: /\.js$/,
            loaders: ['babel-loader'],
            exclude: /node_modules/,
        }, {
            test: /\.css$/,
            loader: "style-loader!css-loader",
        }]
    },
    plugins: [
        new webpack.HotModuleReplacementPlugin()
    ]
}


